import type { R, TableDataInfo } from '@/api/model/resultModel';
import type { XhljMeetingScheduleForm, XhljMeetingScheduleQuery, XhljMeetingScheduleVo } from '@/api/xhlj/model/meetingScheduleModel';
import { request } from '@/utils/request';

// 查询大会日程列表
export function listMeetingSchedule(query?: XhljMeetingScheduleQuery) {
  return request.get<TableDataInfo<XhljMeetingScheduleVo>>({
    url: '/xhlj/meetingSchedule/list',
    params: query,
  });
}

// 查询大会日程详细
export function getMeetingSchedule(meetingScheduleId: number) {
  return request.get<R<XhljMeetingScheduleVo>>({
    url: `/xhlj/meetingSchedule/${meetingScheduleId}`,
  });
}

// 新增大会日程
export function addMeetingSchedule(data: XhljMeetingScheduleForm) {
  return request.post<R<void>>({
    url: '/xhlj/meetingSchedule',
    data,
  });
}

// 修改大会日程
export function updateMeetingSchedule(data: XhljMeetingScheduleForm) {
  return request.put<R<void>>({
    url: '/xhlj/meetingSchedule',
    data,
  });
}

// 删除大会日程
export function delMeetingSchedule(meetingScheduleIds: number | Array<number>) {
  return request.delete<R<void>>({
    url: `/xhlj/meetingSchedule/${meetingScheduleIds}`,
  });
}
